import user.AdminUser;
import user.NormalUser;
import user.ProxyUser;
import user.User;
import user.factory.AdminFactory;
import user.factory.IUserFactory;
import user.factory.NormalUserFactory;

public class LibrarySystem {

    public static void main(String[] args) {
        // 工厂模式
        IUserFactory adminUserFactory = new AdminFactory();
        User adminUser = adminUserFactory.createUser("刘备", 1);
        IUserFactory normalUserFactory = new NormalUserFactory();
        User normalUser = normalUserFactory.createUser("关⽻", 2);

        // 代理模式
        ProxyUser proxyUserAdmin = new ProxyUser(adminUser);
        ProxyUser proxyUserNormal = new ProxyUser(normalUser);

    }
    public static void main1(String[] args) {
        // 直接创建管理员⽤⼾
        User adminUser = new AdminUser("刘备", 1);
// 直接创建普通⽤⼾
        User normalUser1 = new NormalUser("关⽻", 2);
        User normalUser2 = new NormalUser("张⻜", 3);

    }
}
